﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using CodeGame.ServerObjects;

namespace CodeGame.Networking.Serverside.ClientServerPackets
{
    class GlobalChatPacket : ServerPacket
    {
        public override ClientServerNet GetID()
        {
            return ClientServerNet.GlobalChat;
        }

        public override void Handle(Lidgren.Network.NetIncomingMessage message, Lidgren.Network.NetConnection sender)
        {
            ServerProtocolChat.SendGlobalChat(ServerSingletons.Players.GetPlayer(sender), message.ReadString());
        }
    }
}
